import Cookie from 'js-cookie'
import { TOKEN_KEY } from '@/constants'

// 获取token的方法
export const getLocalToken = () => {
  return Cookie.get(TOKEN_KEY)
}

// 设置方法
export const setLocalToken = (token: string) => {
  Cookie.set(TOKEN_KEY, token)
}

// 删除方法
export const removeLocalToken = () => {
  Cookie.remove(TOKEN_KEY)
}
